<%--
  Created by IntelliJ IDEA.
  User: 雄帅
  Date: 2018/8/28
  Time: 14:17
  To change this template use File | Settings | File Templates.
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="d" uri="http://dgg.net/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>查询证书</title>
    <%@ include file="../../../header.jsp" %>
</head>
<body class="body-main">
<div class="titleSearch">
    <div style="display: none;">
        <input id="generalType" value="${generalType}"/>
    </div>
    <form id="titleSearch">
        <d:hasUrlAuth authCode="ZZSC_ZS_SYB">
            <div class="layui-inline">
                <label>所属事业部：</label>
                <div class="layui-input-inline">
                    <select name="signOrgId" id="signOrgId" class="input-style" autocomplete="off">
                        <option value="">全部</option>
                    </select>
                </div>
            </div>
        </d:hasUrlAuth>
        <d:hasUrlAuth authCode="ZZSC_ZS_PT_GLY">
            <div style="display: none;">
                <input id="permissions" value="No"/>
            </div>
        </d:hasUrlAuth>
        <div class="layui-inline">
            <label>出库原因：</label>
            <div class="layui-input-inline">
                <select class="select-style" name="outboundReason">
                    <option value="">全部</option>
                    <c:forEach var="r" items="${outboundReason}">
                        <option value="${r.code}">${r.name}</option>
                    </c:forEach>
                </select>
            </div>
        </div>

        <div class="layui-inline">
            <label>证书类型：</label>
            <div class="layui-input-inline">
                <select class="select-style" name="certificateType" id="certificateType" onchange="loadCertificateType('190px','#certificateType','${generalType}',1,'#certificateSpecialtys',0,'#certificateLevel')">
                    <option value="">请选择</option>
                </select>
            </div>
        </div>
        <div class="layui-inline">
            <label>证书专业：</label>
            <div class="layui-input-inline">
                <select class="select-style" name="certificateSpecialtys" id="certificateSpecialtys"
                        onchange="checkCertificateSpecialty('#certificateType','#certificateSpecialtys')"
                        style="width:150px">
                    <option value="">请先选择证书类型</option>
                </select>
            </div>
        </div>
        <div class="layui-inline">
            <label>证书等级：</label>
            <div class="layui-input-inline">
                <select class="select-style" name="certificateLevel" id="certificateLevel" style="width:150px">
                    <option value="">请先选择证书类型</option>
                </select>
            </div>
        </div>

        <div class="layui-inline">
            <label>出库时间：</label>
            <div class="layui-inline">
                <input type="text" name="startDate" placeholder="开始时间" class="Wdate input-style" id="startDate"
                       onfocus="var endDate=$dp.$('endDate'); WdatePicker({onpicked:function(){endDate.focus();}, maxDate:'#F{ $dp.$D(\'endDate\')}', dateFmt:'yyyy-MM-dd'})">
            </div>
            <span>-</span>
            <div class="layui-inline">
                <input type="text" name="endDate" placeholder="结束时间" class="Wdate input-style" id="endDate"
                       onfocus="WdatePicker({minDate:'#F{$dp.$D(\'startDate\')}', dateFmt:'yyyy-MM-dd'})">
            </div>
        </div>

        <div class="layui-inline">
            <label>持证人电话：</label>
            <div class="layui-input-inline">
                <input type="text" class="input-style win100" id="personalPhone" name="personalPhone"/>
            </div>
        </div>

        <div class="layui-inline">
            <label>身份证号码：</label>
            <div class="layui-input-inline">
                <input type="text" class="input-style win250" id="personalIdCard" name="personalIdCard"/>
            </div>
        </div>

        <div class="layui-inline">
            <label>关键字：</label>
            <div class="layui-input-inline">
                <input type="text" class="input-style win250" placeholder="领用人/证书编号/持证人/操作人" id="keywords"
                       name="keywords"/>
            </div>
        </div>
    </form>

    <div class="layui-inline">
        <button class="layui-btn layui-btn-mini layui-btn-normal" onclick="search('#myTable','reload')">搜索</button>
        <button class="layui-btn layui-btn-mini layui-btn-primary" onclick="cleanSearch()">清空</button>
    </div>

    <%--转交弹窗 start--%>
    <div class="content-layer layui-layer-wrap" id="transfer">
        <table class="add-table form-table">
            <tbody>
            <tr>
                <th><span class="required">转交接收人：</span></th>
                <td>
                    <select class="chooseUser" id="referredPeople"></select>
                </td>
            </tr>
            <tr>
                <th class="mb8 required"><span>备注：</span></th>
                <td>
                    <label class="remark-input-box">
                        <textarea class="textarea-style" rows="3" id="remark" name="remark" placeholder="500字以内"></textarea>
                    </label>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
    <%--转交弹窗 end--%>

</div>
<div class="table-conter">
    <a href="javascript:void(0)" class="layui-btn layui-btn-mini" onclick="exportCertificate()">导出</a>
    <a href="javascript:void(0)" class="layui-btn layui-btn-mini" onclick="transfer()">转交</a>
</div>
<table id="myTable" class="cell-border crm-table">
</table>

<%@ include file="../../../footer.jsp" %>
<script src="${rootUrl}/static/js/zzsc/common/sc_chooseUser.js?v=${version}" type="text/javascript"
        charset="utf-8"></script>
<script src="${rootUrl}/static/js/zzsc/credential/credentailCommon/credentailCommon.js?v=${version}"></script>
<script src="${rootUrl}/static/js/zzsc/credential/queryCertificate/query_certificate_index.js?v=${version}"></script>
</body>
</html>
